『CおよびC++のコンパイラ・オプション強化ガイド』 - The Linux Foundation
CおよびC++のコンパイラ・オプション強化ガイド - The Linux Foundation
gcc、Clangで使うとよいコンパイラ・オプションについて
安全なC/C++のコンパイルオプションについて書いてある
オリジナルはこっち
Compiler Options Hardening Guide for C and C++ | OpenSSF Best Practices Working Group
code:memo
-O2 -Wall -Wformat=2 -Wconversion -Wtrampolines -Wimplicit-fallthrough \
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 \
-D_GLIBCXX_ASSERTIONS \
-fstrict-flex-arrays=3 \
-fstack-clash-protection -fstack-protector-strong \
-Wl,-z,nodlopen -Wl,-z,noexecstack \
-Wl,-z,relro -Wl,-z,now \
-fPIE -pie -fPIC -shared
-Wformat=2
-Wconversion
-Wtrampolines
-Wimplicit-fallthrough
-fstrict-flex-arrays=3
-D_GLIBCXX_ASSERTIONS
-fstrict-flex-arrays=3
-fstack-clash-protection
-fstack-protector-strong
-Wl,-z,nodlopen
-Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now
-fPIE
-pie
-fPIC
-shared
静的解析
Sanitizers
AddressSanitizer
MemorySanitizer
ThreadSanitizer
LeakSanitizer
UndefinedBehaviorSanitizer
AddressSanitizer
AddressSanitizer - Gentoo Wiki
AddressSanitizer · google/sanitizers Wiki
MemorySanitizer
MemorySanitizer · google/sanitizers Wiki
-Wconversion
関連
dlopen
debuginfo
objcopy
Cppcheck
-Wformat
メモ
gcc の -Wall 以外の警告オプション - higepon blog
AddressSanitizer | Microsoft Learn
型の暗黙的変換に警告を出そう!gcc -Wconversion - 極楽とんぼのロボット製作記
(23) 【2024年01月号】OSSコミュニティの神話をデータで分析/2023年の開発者エコシステムを解説/セキュリティ分野のガイド集の日本語版が公開 - YouTube
OpenSSFガイド日本語版を公開 - The Linux Foundation
Compiler Options Hardening Guide for C and C++ | OpenSSF Best Practices Working Group
#C/C++ #セキュリティ
#文献